package com.feicheng.iou.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author tianchunlei
 * @Des //定时任务
 * @Date 2021/7/23
 **/
@Component
@EnableScheduling  //开启定时任务
@Slf4j
@EnableAsync //开启异步任务
public class NoticeSchedule {

    @Async //异步任务执行
    @Scheduled(cron = "0 1 15 * * ?")
    public void test() {
        log.info(".....");
    }


}
